<template>
	<u-popup v-model="addShow" mode="center" height="312rpx" width="514rpx" border-radius="16">
		<view class="popup">
			<view class="title">
				增加数量
			</view>
			<view class="center">
				<image :src="$IMG_URL('/static/coach/reduce.png')" mode="" class="icon" @click="reduce"></image>
				<view class="num">
					{{Num}}
				</view>
				<image :src="$IMG_URL('/static/coach/add.png')" mode="" class="icon" @click="add"></image>
			</view>
			<view class="popupfoot">
				<view class="btn1" @click="close">
					取消
				</view>
				<view class="btn2" @click="sure">
					确认
				</view>
			</view>
		</view>
	</u-popup>
</template>

<script>
	export default{
		props:{
			addShow: {
				type: Boolean,
				default: false,
				required: true
			},
			Num: {
				type: Number,
				default: 0,
				required: true
			},
		},
		data(){
			return{
				
			}
		},
		methods:{
			reduce(){
				this.$emit('reduce', this.Num)
			},
			add(){
				this.$emit('add', this.Num)
			},
			close(){
				this.$emit('close')
			},
			sure(){
				this.$emit('sure')
			}
		}
	}
</script>

<style lang="scss" scoped>
	.popup{
		width: 514rpx;
		height: 312rpx;
		.title{
			width: 514rpx;
			height: 92rpx;
			background: #f6f6f6;
			border-radius: 16rpx 16rpx 0rpx 0rpx;
			font-size: 32rpx;
			font-family: PingFang SC, PingFang SC-Bold;
			font-weight: 700;
			text-align: center;
			color: #000000;
			display: flex;
			align-items: center;
			justify-content: center;
		}
		.center{
			padding: 44rpx 0;
			display: flex;
			flex-direction: row;
			align-items: center;
			justify-content: center;
			.icon{
				width: 40rpx;
				height: 40rpx;
			}
			.num{
				width: 68rpx;
				height: 40rpx;
				font-size: 28rpx;
				font-family: PingFang SC, PingFang SC-Bold;
				font-weight: 700;
				text-align: center;
				color: #000000;
				display: flex;
				align-items: center;
				justify-content: center;
			}
		}
		.popupfoot{
			width: 100%;
			display: flex;
			flex-direction: row;
			align-items: center;
			justify-content: space-around;
			.btn1{
				width: 198rpx;
				height: 68rpx;
				background: #f6f6f6;
				border-radius: 16rpx;
				font-size: 28rpx;
				font-family: PingFang SC, PingFang SC-Medium;
				font-weight: 500;
				color: #000000;
				display: flex;
				align-items: center;
				justify-content: center;
			}
			.btn2{
				width: 198rpx;
				height: 68rpx;
				background: #73F0EA;
				border-radius: 16rpx;
				font-size: 28rpx;
				font-family: PingFang SC, PingFang SC-Medium;
				font-weight: 500;
				color: #ffffff;
				display: flex;
				align-items: center;
				justify-content: center;
			}
		}
	}
</style>